﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace csvmb.contracts {
using ebcpatterns;
using csvmb.contracts.datacontracts;
public interface IDatei_oeffnen {
  event Action<Ausschnitt> Result;
  void Process(Tuple<string,int> message);
}
public partial class Datei_oeffnen : IDatei_oeffnen {
  public event Action<Ausschnitt> Result;

  private Action<Tuple<string,int>> _Process;
  public void Process(Tuple<string,int> message) {
    _Process(message);
  }
  public Datei_oeffnen(IMap<Tuple<string,int>,string> map, IHeader_bestimmen Header_bestimmen, IDatensaetze_lesen Datensaetze_lesen, IJoin<IEnumerable<string>,IEnumerable<Datensatz>,Ausschnitt> join) {
    this._Process += map.Input;
    map.Output += Header_bestimmen.Process;
    this._Process += Datensaetze_lesen.Process;
    Header_bestimmen.Result += join.Input1;
    Datensaetze_lesen.Result += join.Input2;
    join.Output += m => this.Result(m);
  }
}

}
namespace csvmb.contracts {
using csvmb.contracts.datacontracts;
public interface IZeilen_lesen_ab_Zeile_2 {
  event Action<IEnumerable<string>> Result;
  void Process(Tuple<string,int> message);
}
public interface IDatensaetze_erstellen {
  event Action<IEnumerable<Datensatz>> Result;
  void Process(IEnumerable<string> message);
}
public interface IDatensaetze_lesen {
  event Action<IEnumerable<Datensatz>> Result;
  void Process(Tuple<string,int> message);
}
public partial class Datensaetze_lesen : IDatensaetze_lesen {
  public event Action<IEnumerable<Datensatz>> Result;

  private Action<Tuple<string,int>> _Process;
  public void Process(Tuple<string,int> message) {
    _Process(message);
  }
  public Datensaetze_lesen(IZeilen_lesen_ab_Zeile_2 Zeilen_lesen_ab_Zeile_2, IDatensaetze_erstellen Datensaetze_erstellen) {
    this._Process += Zeilen_lesen_ab_Zeile_2.Process;
    Zeilen_lesen_ab_Zeile_2.Result += Datensaetze_erstellen.Process;
    Datensaetze_erstellen.Result += m => this.Result(m);
  }
}

}
namespace csvmb.contracts {
public interface IErste_Zeile_lesen {
  event Action<string> Result;
  void Process(string message);
}
public interface ISpaltennamen_bestimmen {
  event Action<IEnumerable<string>> Result;
  void Process(string message);
}
public interface IHeader_bestimmen {
  event Action<IEnumerable<string>> Result;
  void Process(string message);
}
public partial class Header_bestimmen : IHeader_bestimmen {
  public event Action<IEnumerable<string>> Result;

  private Action<string> _Process;
  public void Process(string message) {
    _Process(message);
  }
  public Header_bestimmen(IErste_Zeile_lesen Erste_Zeile_lesen, ISpaltennamen_bestimmen Spaltennamen_bestimmen) {
    this._Process += Erste_Zeile_lesen.Process;
    Erste_Zeile_lesen.Result += Spaltennamen_bestimmen.Process;
    Spaltennamen_bestimmen.Result += m => this.Result(m);
  }
}

}
namespace csvmb.contracts {
using csvmb.contracts.datacontracts;
public interface IGui {
  event Action<Tuple<string,int>> Datei_oeffnen;
  void Zeige_Ausschnitt(Ausschnitt message);
}
public interface IMainboard {
}
public partial class Mainboard : IMainboard {


  public Mainboard(IGui Gui, IDatei_oeffnen Datei_oeffnen) {
    Gui.Datei_oeffnen += Datei_oeffnen.Process;
    Datei_oeffnen.Result += Gui.Zeige_Ausschnitt;
  }
}

}
